package com.chris.design.pattern.samples.strategy;

/**
 * 描述说明
 *
 * @author Chris
 * @since 2019/8/26
 */
public class StategyTest {

    public static void main(String[] args) {
        test("1");
        test("2");
    }


    private static void test(String s) {
        ExecutorAdapter adapter = new ExecutorAdapter();
        IExecutorInterface exec = adapter.invoke(s);
        // 执行每个if-else里的实现逻辑
        exec.doSomething(null);
    }
}
